<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:define name="title">
        <h:outputText value="#{bundle.EditProjectTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body">
        <h:form styleClass="form" >
            <p:fieldset legend="Project Edit" >
                <h:outputText value="#{projectController.current.prjName}" styleClass="engraved"/>
                <br/>
                <p:separator/>
                <c:choose>
                    <c:when test="#{userController.allowedGroups('2')}">
                        <p:commandButton ajax="false" action="#{projectController.prepareList}" value="Show All" immediate="true"/>
                        <p:spacer width="10"/>
                    </c:when>
                </c:choose>
                <p:commandButton action="#{projectController.update}" value="Update"  />
                <p:spacer width="10"/>
                <p:commandButton ajax="false" action="index" value="Cancel" immediate="true"/>
                <br/>
                <br />
                <h:panelGrid columnClasses="label,field" columns="2" styleClass="form_list">
                    <h:outputLabel value="#{bundle.EditProjectLabel_prjId}" for="prjId" />
                    <p:inputText id="prjId" value="#{projectController.current.prjName}" required="true" requiredMessage="#{bundle.EditProjectRequiredMessage_prjId}"/>
                    <h:outputLabel value="#{bundle.EditProjectLabel_prjDesc}" for="prjDesc" />
                    <p:inputText id="prjDesc" value="#{projectController.current.prjDesc}"  />
                </h:panelGrid>
            </p:fieldset>
        </h:form>
    </ui:define>
</ui:composition>


